package com.example.company.api

import com.example.base.app.conts.BaseConst
import com.example.common.view.api.BaseApiServer
import com.example.common.view.model.BaseResultData
import com.example.company.entity.CompanyDetailEntity
import com.example.company.entity.CompanyEntity
import com.example.company.entity.GetMerChant
import com.example.company.entity.MerChant
import com.example.company.entity.MerChantDetail
import com.example.company.entity.MerChantDetailEntity
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface CompanyApiServer:BaseApiServer {
    @GET(BaseConst.GET_COMPANY_URL)
    suspend fun getCompany():BaseResultData<List<CompanyEntity>>
    @GET(BaseConst.GET_COMPANY_DETAIL_URL)
    suspend fun getCompanyDetail(@Path("id")id:Int):BaseResultData<CompanyDetailEntity>
    @POST(BaseConst.POST_MERCHANT_URL)
    suspend fun postMerchant(@Body body:MerChant):BaseResultData<MerChant>
    @GET(BaseConst.POST_MERCHANT_URL)
    suspend fun getMerChant():BaseResultData<List<GetMerChant>>
    @GET(BaseConst.GET_MERCHANT_DETAIL_URL)
    suspend fun getMerChantDetail(@Path("id")id:Int):BaseResultData<MerChantDetail>
}